package com.yegs.jltqc.U8Controller;

import com.yegs.jltqc.U8Service.CgbarcodeService;
import com.yegs.jltqc.config.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("/cgbarcode")
public class CgbarcodeController {

    @Autowired
    private CgbarcodeService cgbarcodeService;


    @GetMapping("/findAllByAutoId")
    public Msg query(@RequestParam Long autoid){
        return Msg.success("page",cgbarcodeService.findAllByAutoId(autoid));
    }


    @GetMapping("/findByBarcode")
    public Msg findByBarcode(@RequestParam String barcode){
        return Msg.success("page",cgbarcodeService.findByBarcode(barcode));
    }

}
